package com.leon.lifeenginespace.spring;

import lombok.extern.slf4j.Slf4j;

/**
 * @description: 模板方法
 * @author: WT
 * @date: 2024/4/28 23:29
 * @Version 1.0
 **/
@Slf4j
public class TestMethodBean {
    public static void main(String[] args) {
        MyBeanFactory myBeanFactory = new MyBeanFactory();
        myBeanFactory.getBean();

    }


    static class MyBeanFactory {
        public Object getBean() {
            Object o = new Object();
            System.out.println("初始化");

            System.out.println("依赖注入");

            System.out.println("销毁");
            return o;
        }
    }
}